package com.mango.iot.gateway.http.consts;

/**
 * The Enum ResultCodeMessage.
 *
 * @author liangfeihu
 * @since 2021/8/20 15:11
 */
public enum ResultCode {

    SERVER_ERROR("10000", "服务器问题，请重试"),
    INVALID_PARAMETER("10001", "参数错误"),

    DEVICENO_NOT_EXIST("20001", "设备编号不存在"),
    PRODUCT_NOT_EXIST("20002", "产品不存在"),
    PRODUCT_DYNAMIC_REGISTER_NO("20003", "该产品未开启动态注册"),

    AUTH_CONFIG_NOT_FOUND("20010", "没有配置认证"),
    PASSWORD_INCORRECT("20011", "签名不正确"),

    TOPIC_INVALID("20100", "Topic有误"),

    REQ_FORBIDDEN("30000", "无权限访问"),
    TOKEN_INVALID("30001", "Token失效,请重新认证"),
    TOO_MANY_REQUEST("30002", "请求次数过多"),
    ;

    private String code;
    private String message;

    ResultCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
